package com.kfm.base.d0807;

public class Demo02 {

    public static void main(String[] args) {
        /*
            输出所有的水仙花数
         */
        for (int i = 100; i < 1000; i ++){
            int b = i / 100;
            int s = i % 100 / 10;
            int g = i % 10;
            if (i == b * b * b + s * s * s + g * g * g){
                System.out.println(i);
            }
        }
    }
}
